<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数组转化</title>
</head>
<body>
    
</body>
</html>
<script>
    //使用点语法或者Array.form 静态方法将set类型转化为数组
    // const set = new Set(["hdcms","houdunren"]);
    // console.log([...set]);
    // console.log(Array.from(set));

    //移除Set中大于5的数值
    // let hd = new Set("123456789");
    // hd = new Set([...hd].filter(function(item){ return item > 5;}));
    // console.log(hd);

    //去除重复
    //去除字符串重复
    // let str = 'houdunrendunren';
    // console.log([...new Set(str)].join(''));

    //去除数组重复
    // const arr = [1,2,3,4,2,4,6,3,5];
    // arrs = [...new Set(arr)];
    // console.log(arrs)


</script>